package operate.node;

import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.WatchedEvent;

/**
 * @author m0v1
 * @date 2021年09月07日 9:35 下午
 */
public class DeleteNode extends AbstractNodeOperation {
    @Override
    public void process(WatchedEvent event) {
        try {
            System.out.println("delete node:/zk-create-permanent-node-by-api");
            zooKeeper.delete("/zk-create-permanent-node-by-api", -1);
        } catch (InterruptedException | KeeperException e) {
            e.printStackTrace();
        }
    }
}
